home *** CD-ROM | disk | FTP | other *** search
- Path: hilbert.dnai.com!usenet
- From: Victor Bazarov <vbazarov@imsisoft.com>
- Newsgroups: comp.lang.c++
- Subject: Re: C++ Vs. C & Efficiency
- Date: Sat, 13 Jan 1996 11:41:41 -0800
- Organization: IMSI
- Message-ID: <30F80AF5.6E11@imsisoft.com>
- References: <4d59ub$pfg@berlin.infomatch.com>
- NNTP-Posting-Host: vbazarov.imsisoft.com
- Mime-Version: 1.0
- Content-Type: text/plain; charset=us-ascii
- Content-Transfer-Encoding: 7bit
- X-Mailer: Mozilla 2.0b4a (Win16; I)
-
- Edwin Tam wrote:
- >
- > Hello,
- >
- > I have recently become proficient in C++ programming and was wondering about
- > the advantages of C++ vs C. One thing that has always sorta bugged me though
-
- If you are proficient, why in hell are you wondering about the advantages?
- Are you really proficient? Are you really wondering?
-
- > the question of the extra overhead required by C++ ( compiler wise ).
-
- What's "compiler wise"? How can "extra overhead" be "required"?
-
- > It seems as if every C++ programmer wants to 'object'ize every thing without
- > considering the overhead incurred by objects.
-
- What seems?
-
- > Has anyone got any opinions or idea of the overhead imposed by C++??
-
- I heard of the 15-20% decrease of the program speed because of extra calls
- to object ctors and dtors. But I always wonder: compared to what? C has no classes.
- If you do not use classes, if you take C program and compile it with C++
- compiler, there is no change (presuming it can be compiled). So what is all
- the fuss about?
-
- > A simple ponder : For every object instance, every variable of that class is
- > duplicated... even if its not required.
-
- If it's not required, make it static data member, and it'll not be duplicated,
- I say.
-
- > Edwin
-
- What a bandwidth wasted!
-
- Victor.
-
- --
- Signature.
-